import 'package:flutter/material.dart';
import 'package:getx_scaffold/getx_scaffold.dart';
import 'package:oramemo/common/res/gaps.dart';
import 'package:oramemo/common/styles/colors.dart';
import 'package:oramemo/pages/transcription/transcription_chat/screens/chat_screen.dart';
import 'package:oramemo/pages/transcription/transcription_recode/widgets/player_widget.dart';
import 'package:oramemo/widget/gradient_app_head.dart';
import 'package:oramemo/widget/gradient_background.dart';
import 'package:oramemo/common/langs/text_key.dart';

import 'transcription_recode_logic.dart';
import 'view/record_view.dart';
import 'view/record_view.dart';
import 'view/upload_view.dart';
import 'widgets/water_circle.dart';

class TranscriptionRecodePage extends StatelessWidget {
  const TranscriptionRecodePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          GradientAppHead(title: TextKey.transcriptionTitle.tr),
          Expanded(
            child: GradientBackground(
              child: Column(
                children: [
                  Gaps.vGap15,
                  const RecordView(),
                  GetBuilder<TranscriptionRecodeLogic>(builder: (logic) {
                    if (logic.recordedFilePath == null) {
                      return const SizedBox(
                        width: double.infinity,
                      );
                    }
                    return const UploadView();
                  }),
                ],
              ),
            ),
          ),
        ],
      ),
    );
  }
}
